package com.yumeko;

import service.UserService;


/**
 * @program: netty-dubbo-zhenghao
 * @description: 客户端启动类
 * @author: Zheng Hao
 * @create: 2020-03-12 14:46
 */
public class ClientBootstrap {
    public static final String providerName = "UserService#sayHello#";

    public static void main(String[] args) {
        RpcConsumer rpcConsumer = new RpcConsumer();
        UserService proxy = (UserService) rpcConsumer.createProxy(UserService.class, providerName);
        while (true) {
            try {
                Thread.sleep(2000);
                System.out.println(proxy.sayHello("are you ok?"));
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
